package com.zbcz.erp.util

import android.content.Context
import android.widget.Toast
import com.zbcz.erp.ErpApplication


object ToastUtils {

    fun show(message: String) {
        showToast(ErpApplication.mApplication, message, Toast.LENGTH_SHORT)
    }

    fun show(context: Context, message: String) {
        showToast(context, message, Toast.LENGTH_SHORT)
    }

    fun showLong(context: Context, message: String) {
        showToast(context, message, Toast.LENGTH_LONG)
    }

    private fun showToast(context: Context, message: String, duration: Int) {
        Toast.makeText(context, message, duration).show()
    }
}